import { reqGetAllClass, reqGetClassByPage } from "@/api/reqClass";
import type { ClassForm } from "@/types/class";
import { defineStore } from "pinia";
import { onMounted, ref } from "vue";

export const useClassStore = defineStore("class", () => {
  const classList = ref<ClassForm[]>([]);

  const getAllClass = async () => {
    const { status, data } = await reqGetAllClass();
    if (status == 0) {
      classList.value = data;
    }
  };

 

  return {
    classList,
    getAllClass
  };
});
